import Vue from 'vue'
import App from './App.vue'
import router from './router/router.js'

// 引入副文本编辑插件
import VueQuillEditor from 'vue-quill-editor'

import './plugins/element.js'
import './assets/fonts/iconfont.css'

// 富文本插件样式表
// require styles
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

// 引入树形表格插件
import TreeTable from 'vue-table-with-tree-grid';

import axios from 'axios';
// axios.defaults.baseURL = 'http://172.20.169.132:8888/api/private/v1/';//http://127.0.0.1:8888/api/private/v1/
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/';//http://127.0.0.1:8888/api/private/v1/
// axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/';//http://127.0.0.1:8888/api/private/v1/
Vue.prototype.$axios = axios;

// 配置axios请求拦截器
axios.interceptors.request.use((header_config) => {
  header_config.headers.Authorization = window.sessionStorage.getItem('token');
  return header_config;
});

// 全局注册树形表格组件
Vue.component('tree-table', TreeTable);
// 全局注册副文本编辑插件
Vue.use(VueQuillEditor);
// 取消生产提示
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
